package com.zhisheng.gufei.produce.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.zhisheng.core.dao.impl.BaseDaoHibernate;
import com.zhisheng.gufei.produce.dao.BaseInformationDao;
import com.zhisheng.gufei.produce.entity.BaseInformation;

/**
 * @author xgye
 * @date 2009-9-11
 * @version $Id$
 */
@Repository("baseInfoDao")
public class BaseInformationDaoHibernate extends BaseDaoHibernate<BaseInformation, Integer> 
                                    implements BaseInformationDao {

    public List<BaseInformation> getAllBaseInformation() {
        return findAll();
    }

    public List<BaseInformation> getBaseInfoByCorpId(Integer id) {
        return findByHql("from BaseInformation info where info.corporation.id = " + id);
    }

    public void saveOrUpdateBaseInfo(BaseInformation info) {
        saveOrUpdate(info);
    }

}
